﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using hedefgrup.reports.renault;
using System.Collections.Generic;

public partial class top : reportPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        base.initialize();
        base.ensureUserIsLoggedIn();

        administrativeFeature1.Visible
        =
        administrativeFeature2.Visible
        =
        administrativeFeature3.Visible
        =
        administrativeFeature4.Visible
        =
        administrativeFeature5.Visible
        =
        administrativeFeature6.Visible
        =
        administrativeFeature7.Visible
        =
        administrativeFeature8.Visible = base.isAdministrativeLogin();


        nonDealerFeature1.Visible
        =
        nonDealerFeature2.Visible
        =
        nonDealerFeature3.Visible
        =
        nonDealerFeature4.Visible = base.isAdministrativeLogin() || (!base.isDelaer() && new List<string>(user.Current.getProjects()).Contains("rec"));


        nonQRAFeature1.Visible
        =
        nonQRAFeature2.Visible
        =
        nonQRAFeature3.Visible
        =
        nonQRAFeature4.Visible
        =
        nonQRAFeature5.Visible
        =
        nonQRAFeature6.Visible = base.userProjectName != Global.PROJECT_QRA;

        dateTimeDisplay.Text = string.Format("{0:dd.MM.yyyy}&nbsp;&nbsp; {0:HH:mm:ss}", DateTime.Now);
        ProjectName.Text = base.userProjectName.ToUpperInvariant();

    }
}
